// 导入axios实例
import httpRequest from '../request/index'


// 用户登录
export function login(data) {
    return httpRequest({
        url: '/login',
        method: 'post',
        data: data
    });
}

// 用户退出登录
export function logout() {
    return httpRequest({
        url: '/logout',
        method: 'delete',
        headers: { Authorization: `Bearer ${window.sessionStorage.getItem('token')}` }
    });
}